#include <cstdlib>
#include <iostream>

#include "hello.h"

using namespace std;

template <typename T> 
T genericMin(T a, T b) 
{
    return (a < b ? a : b);
}

int globe;

int main(int argc, char *argv[])
{
    // test evenSum()
    int list[ ] = {4, 2, 7, 8, 5, 2};
    bool result = evenSum(list, 6); // invoke the function
    if (result) cout << "the sum is even\n";

    // test template function
    cout << "<<<<<<<<<<<<<<<<<<<" << endl;
    cout << genericMin(3, 4) <<' '<<endl // = genericMin<int>(3,4)
    << genericMin(1.1, 3.1) <<' '<<endl // = genericMin<double>(1.1, 3.1)
    << genericMin('t', 'g') << endl;

    globe = 12;
    cout << globe << endl;
    func();
    cout << globe << endl;
  
    system("PAUSE");
    return EXIT_SUCCESS;
}
